CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )

PROJECT(gltest CXX)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -pthread -fopenmp")

OPTION( BUILD_gltest
"Build the gltest."
ON)


IF(BUILD_gltest)
SET(WIN_DEPENDENCE_PATH 3rdDependence/windows)
INCLUDE_DIRECTORIES(../common/
                    ../../${WIN_DEPENDENCE_PATH}/freeglut-2.8.1/include
                    ../../${WIN_DEPENDENCE_PATH}/glew-1.12.0/include
    )

LINK_DIRECTORIES(../../../${WIN_DEPENDENCE_PATH}/freeglut-2.8.1/lib/x64/Debug/
                 ../../../${WIN_DEPENDENCE_PATH}/glew-1.12.0/lib/Debug/x64/
                 )

FILE(GLOB_RECURSE APPLICATION_TEST_SRC ./*.* ../common/*.*)

ADD_EXECUTABLE(gltest ${APPLICATION_TEST_SRC})

TARGET_LINK_LIBRARIES(gltest glew32d.dll glew32d.lib freeglut.lib freeglut.dll)

configure_file(${ihefe_cpp_ios_SOURCE_DIR}PlatformSpecifics/Windows/VisualStudioUserFile.vcxproj.user.in
               ${CMAKE_CURRENT_BINARY_DIR}/gltest.vcxproj.user
               @ONLY
              )

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../../bin)


ENDIF(BUILD_gltest)